Last Updated 10/28/2022

Sage Essentials
Section 7: Matrix Manipulations

In this section we will learn the commands you need for a typical Linear Algebra course.

Matrices

Example 1

To define a matrix in SageMath, we list the rows of the matrix with the matrix command. For example, let us define the matrix A=[ 1 2 1 1 ] .

 

Try this!

Define the 4×4  identity matrix  I=[ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ] .

 


← Previous Example Next Example →